function slide(){function e(e,t,s,a){i.append("g").attr("id","slidestate").selectAll("path").data(topojson.feature(t,t.objects.counties).features).enter().append("path").attr("d",l);var o=topojson.feature(s,s.objects.landslide_projects).features;i.append("g").attr("id","area").selectAll("path").data(o).enter().append("path").attr("class",function(e){return"slideArea "+e.properties.Site_Name}).attr("d",l),"function"!=typeof Object.keys&&!function(){function e(e){var t,s=[];for(t in e)e.hasOwnProperty(t)&&s.push(t);return s}Object.keys=e}(),d3.select("#btns").selectAll(".buttons").data(o).enter().append("div").attr("class",function(e){return"buttons "+e.properties.Site_Name}).text(function(e){return e.properties.Site_Name}).on("click",function(e){var t=e.properties.Site_Name,s=e.properties;t=t.split(" "),t=t[0],n=Object.keys(o[1].properties);for(var a=Object.keys(s).map(function(e){return s[e]}),r=0;rLink":"Hyperlink"!==n[r]&&(a[r]=n[r]+": "+a[r]);d3.select("#info").style("opacity","1"),d3.selectAll(".buttons").transition().style("background",""),d3.selectAll(".slideArea").transition().style("fill",""),d3.selectAll("."+t).transition().style("fill","#a37181").style("background","#a37181"),d3.select("#info").selectAll(".expand").data(a).html(function(e){return e}),d3.select("#info").selectAll(".expand").data(a).enter().append("p").attr("class","expand").html(function(e){return e})}),i.append("g").attr("id","slidecities").selectAll("path").data(topojson.feature(a,a.objects.cities).features).enter().append("path").attr("d",l.pointRadius(3)).attr("class","slidecity"),i.append("g").attr("id","slidenames").selectAll("slidelabels").data(topojson.feature(a,a.objects.cities).features).enter().append("text").attr("transform",function(e){return"translate("+r(e.geometry.coordinates)+")"}).attr("dy",-5).attr("dx",function(e){var t=e.properties.label;return t.length>8&&t.length<10?-50:t.length>=10&&t.length<12?-60:t.length>=12?-70:8==t.length?-40:-35}).text(function(e){return e.properties.label}).attr("class","slidelabels")}var t,s=d3.select("#landslide_projects").style("width"),a=420;s=s.substring(0,s.length-2),t=s>500&&700>s?10*s:s>=700&&1e3>s?7*s:s>=1e3&&1500>s?4*s:s>=1500&&2e3>s?3*s:s>=2e3?1.5*s:10*s;var n,r=d3.geo.conicConformal().rotate([120.5,0]).center([0,47.3]).parallels([45.83,47.33]).scale(t).translate([s/2,a/2]).precision(.1),l=d3.geo.path().projection(r),o=d3.select("#landslide_projects").append("svg").attr("width",s).attr("height",a),i=o.append("g");queue().defer(d3.json,"https://s3-us-west-2.amazonaws.com/geolpublist/json/counties.json").defer(d3.json,"https://s3-us-west-2.amazonaws.com/geolpublist/json/landslide_projects.json").defer(d3.json,"https://s3-us-west-2.amazonaws.com/geolpublist/json/cities.json").await(e)}slide();